<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增群信息')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-groups-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">群名称：</label>
                <div class="col-sm-8">
                    <input name="name" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">群公告：</label>
                <div class="col-sm-8">
                    <textarea name="notification" class="form-control" ></textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">群简介：</label>
                <div class="col-sm-8">
                    <textarea name="introduction" class="form-control" ></textarea>
                </div>
            </div>
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">群头像：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <img name="faceUrl" class="form-control" src="">-->
<!--                    <input name="faceUrl"  class="form-control" type="file">-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">-->
<!--                <label class="col-sm-3 control-label">：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <textarea name="ex" class="form-control"></textarea>-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label">创建者：</label>
                <div class="col-sm-8">
                    <input name="creatorUserId" class="form-control" type="text"  th:disable="${creatorUserId}? disabled : ''" th:value="${creatorUserId}">
<!--                    <input name="creatorUserId" class="form-control" type="hidden">-->
                </div>
            </div>

        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "im/groups"
        $("#form-groups-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-groups-add').serialize());
            }
        }

        $("input[name='notificationUpdateTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>